#{extends 'content.html' /}
#{set title: '我的粉丝' /}
#{set followers :'active' /}
#{set user_name : usr.name /}
#{set user_img : usr.avatar/}
#{set myFollowings : usr.getFollowing()/}
#{set user_post_cnt : usr.postCnt/}
#{set user_followers_cnt : usr.followersCnt/}
#{set user_following_cnt : usr.followingCnt/}
<br>
<h2>已有#{get 'user_followers_cnt'/}人关注你</h2>
<hr>
<table>
    <tbody>
        #{list items: usr.getFollowers(), as: 'follower'}
        <tr>
    <img src="${follower.avatar}" style="width: 50px;height: 50px" >
    ${follower.name}
    
    #{if !myFollowings.contains(follower)}  
    <a class="badge badge-info follow" data-uid="${follower.id}" href="">关注</a>  
    #{/if}  
    #{else}  
    <a class="badge badge-error unfollow" data-uid="${follower.id}" href="">取消</a>    
    #{/else}
    
    <br>
    <br>
</tr>
#{/list}
</tbody>
</table>
